-- GENERATED SPELL FOR [Dragonflayer Huscarl] --


function spell0_27260(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27260', 575, 1)
end

function spell1_27260(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_27260', 30334, 1)
end

function spell2_27260(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27260', 5295, 1)
end

function spell3_27260(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(12555,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27260', 5262, 1)
end

function spell4_27260(pUnit, Event) --@Squish,n/a--
pUnit:FullCastSpellOnTarget(52223,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27260', 617, 1)
end

function spell5_27260(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_27260', 547, 1)
end

function spell6_27260(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(49807,pUnit)
pUnit:RegisterEvent('Sorts_27260', 2000, 1)
end

function Sorts_27260(pUnit, Event)
local choix_sorts_27260 = math.random(0, 6)
if choix_sorts_27260 == 0 then
pUnit:RegisterEvent('spell0_27260', 1, 1)
end
if choix_sorts_27260 == 1 then
pUnit:RegisterEvent('spell1_27260', 1, 1)
end
if choix_sorts_27260 == 2 then
pUnit:RegisterEvent('spell2_27260', 1, 1)
end
if choix_sorts_27260 == 3 then
pUnit:RegisterEvent('spell3_27260', 1, 1)
end
if choix_sorts_27260 == 4 then
pUnit:RegisterEvent('spell4_27260', 1, 1)
end
if choix_sorts_27260 == 5 then
pUnit:RegisterEvent('spell5_27260', 1, 1)
end
if choix_sorts_27260 == 6 then
pUnit:RegisterEvent('spell6_27260', 1, 1)
end
end

function mob27260_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27260', math.random(1500, 3000), 1)
end

function mob27260_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27260_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27260_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27260, 1, 'mob27260_Action')
RegisterUnitEvent(27260, 2, 'mob27260_Leave')
RegisterUnitEvent(27260, 3, 'mob27260_Kill')
RegisterUnitEvent(27260, 4, 'mob27260_Die')
